package ads.server;

import java.net.URI;
import java.util.ArrayList;

import ads.exception.InvalideInvokerException;
import ads.exception.SpreadRemoteException;

public interface SpreadMemberRemoteInterface {
	/**
	 * called when new server join in the group
	 * 
	 * @return privateGroupname(ID) of the primary server
	 * @throws SpreadRemoteException
	 */
	public String queryPrimaryServer() throws SpreadRemoteException,InvalideInvokerException;

	/**
	 * primary server call this method to send current server list to all
	 * server.this method was called when membership of server group was changed
	 * 
	 * @param primaryServer
	 *            privateGroupname(ID) of the primary server
	 * @throws SpreadRemoteException
	 */
	public void updateServers(String primaryServer)
			throws SpreadRemoteException;

	/**
	 * @return the RMI URI of the primary server
	 * @throws SpreadRemoteException
	 */
	public URI getPrimaryServerURI() throws SpreadRemoteException,InvalideInvokerException;

}
